import React, { StrictMode } from 'react'
import ReactDOM from 'react-dom'
import { Switch } from 'react-router-dom'
import { BrowserRouter } from 'react-router-dom'
import routes, { makeNavLinks, makeRoutes } from './routes'
import 'bootstrap/dist/css/bootstrap.min.css'
import 'rsuite/dist/rsuite.min.css'
// import { Cascader, CustomProvider } from 'rsuite'
// import data from './province-simplified.json'
import zhCN from 'rsuite/locales/zh_CN'
import { CustomProvider } from 'rsuite'

function App() {
  return (
    <StrictMode>
      <CustomProvider locale={zhCN}>
        <BrowserRouter>
          <div className="container d-flex justify-content-between mt-3">
            <div style={{ width: '200px' }}>{makeNavLinks(routes)}</div>
            <div style={{ flex: 1 }}>
              <Switch>{makeRoutes(routes)}</Switch>
            </div>
          </div>

          {/*<Cascader searchable={false} data={data} style={{ width: 120 }} block={true} onChange={(e)=> console.log(e)}/>*/}
        </BrowserRouter>
      </CustomProvider>
    </StrictMode>
  )
}

ReactDOM.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
  document.getElementById('root')
)
